<!--This checks the browser and presents an alert to inform people to use a compatible browser
In this case, the approved browser is on Mac: IE 5.0+ or Netscape 6.0+ and Windows: IE 4.5+ or Netscape 6.0+ 
This is to allow for CSS to be utilized properly. Netscape 4.7 is treated as a special case since it works but has quirkiness including losing style sheets when resizing the browser window (Netscape 4.08 Navigator is the same as the Communicator 4.7)
-->
function brwcheck() {
    var agt=navigator.userAgent.toLowerCase();

    var is_win=((agt.indexOf('win')!=-1) || (agt.indexOf('16bit')!=-1));
    var is_mac=(agt.indexOf('mac')!=-1);

	var is_op=(agt.indexOf('opera') !=-1);
	var is_ie=(is_op==false && agt.indexOf('msie') !=-1);
	var is_nav=(is_op==false && ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible')==-1)));

	if (is_op==true) {	var is_minor=parseFloat(agt.substring(agt.indexOf('opera')+5,(agt.length-1)));}
	else {
		if(is_ie==true) { var is_minor=parseFloat(agt.substring(agt.indexOf('msie')+4,(agt.indexOf('msie')+11)));}
		else{var is_minor=parseFloat(navigator.appVersion);}
	}
	var is_major=parseInt(is_minor);

	//The default is set to false (incompatible), then all approved/compatible browsers are set to true
	var resultck=false;	
	if (is_mac) {if (((is_ie==true) && (is_major>=5))  || ((is_nav==true) && (is_major>=5))) {resultck=true;}}
	else {if        (((is_ie==true) && (is_minor>=4.5)) || ((is_op==true) && (is_minor>=3.6)) || ((is_nav==true) && (is_major>=5))) {resultck=true;}}
	if(resultck==false){
		if ((is_nav==true)&&(is_major<=5)&&((is_minor==4.08)||(is_minor>=4.7))) { 
			document.write("<P>&nbsp;<br><font size='4' face='Verdana,Arial,Helvetica,sans-serif' color='#CC0000'><b><br>You are using Netscape 4.7. While most pages will display properly you may have problems with formatting when you resize the Web browser. \r</b></font>");
			document.write("<font size='3' face='Verdana,Arial,Helvetica,sans-serif' color='#CC0000'><br>The supported Web browsers include:\r<br>Macintosh: IE 5.0+ and Netscape 6.0+<br>Windows: IE 4.5+ and Netscape 6.0+\r<p>You can download the latest versions for free at the following locations:\r<br><a href='http://www.microsoft.com/windows/ie/download/ie55.htm' target='_blank'>Internet Explorer Windows 5.5</a>\r<br><a href='http://www.microsoft.com/mac/products/ie/' target='_blank'>Internet Explorer Mac 5</a>\r<br><a href='http://home.netscape.com/download/' target='_blank'>Netscape</a>\r</font><P>");
		}
		else { 
			document.write("<P>&nbsp;<br><font size='4' face='Verdana,Arial,Helvetica,sans-serif' color='#CC0000'><b><br>Your Web browser may not be compatible with this site and you may experience problems viewing pages and submitting forms!\r</b></font>");
			document.write("<font size='3' face='Verdana,Arial,Helvetica,sans-serif' color='#CC0000'><br>The supported Web browsers include:\r<br>Macintosh: IE 5.0+ and Netscape 6.0+<br>Windows: IE 4.5+ and Netscape 6.0+\r<p>You can download the latest versions for free at the following locations:\r<br><a href='http://www.microsoft.com/windows/ie/download/ie55.htm' target='_blank'>Internet Explorer Windows 5.5</a>\r<br><a href='http://www.microsoft.com/mac/products/ie/' target='_blank'>Internet Explorer Mac 5</a>\r<br><a href='http://home.netscape.com/download/' target='_blank'>Netscape</a>\r</font><P>");
		}
	}
//For testing only remove afterwards:
	if (is_win==true) {alert("Windows detected");}
	if (is_mac==true) {alert("Mac detected");}	
	if (is_op==true) {alert("Opera detected");}
	if (is_ie==true) {alert("IE detected");}
	if (is_nav==true) {alert("Netscape detected");}
	if (is_nav==false&&is_ie==false&&is_op==false) {alert("nothing detected");}
	alert("major version: " + is_major + "\r" + "minor version: " + is_minor);
}

#selstart#
**** Then put in document where you want message displayed: ****
<script language="JavaScript" type="text/javascript">
brwcheck();
</script>
#selend#
